WI

[Encerrado] Ajuda Com Sistema de BLess

Por willks123, 26 de nov. de 2017 em Tópicos Sem Resposta

2
680
willks123W
26 de novembro de 2017 às 12:12

Pessoal, se alguem puder me ajudar... Esse meu script de bless só esta removendo gold da BP, ele nao usa o Gold do Banco. Tem como arrumar ele pra mim pra Caso o player nao tenha o GOLD na bp ele usar o do Banco?

bless:
 

Spoiler
local blessPrice = 50000 -- preço em Gold Coins.

local function haveAllBlessings(player)
    local blessingsCount = 0
    for blessing = 1, 8 do
        if player:hasBlessing(blessing) then
            blessingsCount = blessingsCount + 1
        end
    end
    
    return blessingsCount == 8
end

function onSay(player, words, param)
    if haveAllBlessings(player) then
        return player:sendTextMessage(MESSAGE_INFO_DESCR, "You have already been blessed by the gods.") and true
    end
    
    if not player:removeMoney(blessPrice) then
        return player:sendCancelMessage("You do not have enough money.") and true
    end
    
    for blessing = 1, 8 do
        if not player:hasBlessing(blessing) then
            player:addBlessing(blessing, 1)
        end
    end
    
    player:sendTextMessage(MESSAGE_INFO_DESCR, "You have bought all blessings.")
    
    return true
end

 

 

5 meses depois...
StigalS
19 de abril de 2018 às 17:12
A questão neste tópico de suporte foi encerrada por falta de resposta. Este tópico está fechado e foi movido para Suporte - Tópicos Sem Resposta